<%-- 
    Document   : LihatBarangCabang
    Created on : Nov 24, 2013, 12:49:32 PM
    Author     : tea milandi
--%>

<%@page import="java.sql.ResultSet"%>
<%@page import="bean.StokBarang"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Lihat Barang</title>
    </head>
    <body bgcolor="FFC373"> 
    <center>
        <br>
        <table border="0" width="490">
            <tr>
                <td colspan="3" align="center"><img src="gambar/logo asmart.png" width="300" height="84"/></td>
            </tr>
            <tr>
                <td colspan="3" align="center"><font face="Disko" size="6px">DATA BARANG DI PUSAT</font></td>
            </tr>
            <tr>
                <td>
            <center>
                <table border="1">
                    <tr>
                        <td width="50" align="center" bgcolor="663300"><font color="white" face="Francis Gothic Reduced">NO</font></td>
                        <td width="90" align="center" bgcolor="663300"><font color="white" face="Francis Gothic Reduced">ID BARANG</font></td>
                        <td width="140" align="center" bgcolor="663300"><font color="white" face="Francis Gothic Reduced">NAMA BARANG</font></td>
                        <td width="140" align="center" bgcolor="663300"><font color="white" face="Francis Gothic Reduced">JUMLAH BARANG</font></td>
                        <td width="130" align="center" bgcolor="663300"><font color="white" face="Francis Gothic Reduced">HARGA BARANG</font></td>
                    </tr>
                    <%
                        StokBarang barangPusat = new StokBarang();
                        ResultSet resultSet = barangPusat.tampilBarang();
                        int counter = 1;
                        while (resultSet.next()) {
                            out.print("<tr>");
                            out.print("<td align='center'>" + (counter) + "</td>");
                            out.print("<td align='center'>" + resultSet.getString("idbarang") + "</td>");
                            out.print("<td align='center'>" + resultSet.getString("namabarang") + "</td>");
                            out.print("<td align='center'>" + resultSet.getString("jumlahbarang") + "</td>");
                            out.print("<td align='center'>" + resultSet.getString("hargabarang") + "</td>");
                            out.print("</tr>");
                            counter++;
                        }
                    %> 
                </table>
            </center>
            </td>
            </tr>
            <tr>   
                <td align="center" colspan="3"><form action="HomeCabang.jsp"><input type="image" src="gambar/back_button.png" height="40" width="120"  name="submit"></form></td>
            </tr>
        </table>
    </center>
</body>
</html>

